var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        im.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        im.dispose()
    } else {
        if (status === a++) {
            var e = im.getItemId();
            im.gainItem(e, -1);
            im.teachSkill(80001288, 0, -1);
            im.teachSkill(80001288, 1, 0);
            im.teachSkill(80001288, 1, 0);
            im.sendNormalTalk("#b#s 80001288# #q80001288# (7天数)#k技能已获得！", 4, 9010000, false, true);
            im.dispose()
        }
    }
};